{{IF [[accessControl.hasPermission([[$DAccessControl::VIEW_TASK_ACCESS]])]]}}
  <h3>Tasks cracking this hashlist:</h3>
  <div class="card">
    <div class="table-responsive">
      <table class="table table-bordered">
        <tr>
          <th>ID</th>
          <th>Color</th>
          <th>Name</th>
          <th>Dispatched</th>
          <th>Searched</th>
          <th>Cracked</th>
        </tr>
        {{FOREACH task;[[tasks]]}}
          <tr>
            <td>
              <a href="tasks.php?id=[[task.getVal('task')->getId()]]">[[task.getVal('task')->getId()]]</a>
            </td>
            <td{{IF [[strlen([[task.getVal('task').getColor()]])]] > 0}} style="background-color: #[[task.getVal('task').getColor()]]""{{ENDIF}}>
              &nbsp;
            </td>
            <td>
              <a href="tasks.php?id=[[task.getVal('task')->getId()]]" title="[[task.getVal('task')->getAttackCmd()]]">[[task.getVal('task')->getTaskName()]]</a>
              [[Util::tickdone([[task.getVal('task')->getKeyspaceProgress()]], [[task.getVal('task')->getKeyspace()]])]]
              {{IF [[task.getVal('isActive')]] || [[task.getVal('searched')]] < [[task.getVal('task')->getKeyspace()]]}}
                <i class="fas fa-spinner fa-spin"></i>
              {{ENDIF}}
            </td>
            <td class="num">
              [[Util::showperc([[task.getVal('dispatched')]], [[task.getVal('task')->getKeyspace()]])]]%
            </td>
            <td class="num">
              [[Util::showperc([[task.getVal('searched')]], [[task.getVal('task')->getKeyspace()]])]]%
            </td>
            <td class="num">
              {{IF [[task.getVal('cracked')]] > 0 && [[accessControl.hasPermission([[$DAccessControl::VIEW_HASHES_ACCESS]])]]}}
                <a href="hashes.php?task=[[task.getVal('task')->getId()]]">[[task.getVal('cracked')]]</a>
              {{ELSE}}
                [[task.getVal('cracked')]]
              {{ENDIF}}
            </td>
          </tr>
        {{ENDFOREACH}}
      </table>
    </div>
  </div>
{{ENDIF}}